package com.xxxx.mail;


import com.xxxx.server.YebServerApplication;
import com.xxxx.server.pojo.Admin;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = YebServerApplication.class)
public class Om {

    @Autowired
    private RedisTemplate<String,Object> redisTemplate;

    @Test
    public void test2() {
        Admin admin = new Admin();
        admin.setName("刘备");
        admin.setAddress("北京");
        redisTemplate.opsForValue().set("key3",admin);

    }
}


